<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('guestbookadmin/index')}">{:L('API_GUESTBOOKADMIN_INDEX')}</a></li>
		</ul>

		<form class="well form-search" method="post" action="{:U('guestbookadmin/index')}">
			分类：
			<select name="status" style="width: 120px;">
				<option <if condition="$status == -1 ">selected</if> value='-1'>全部</option>
				<option 	<if condition="$status == 1 ">selected</if>  value='1'>未读</option>
				<option value='2' <if condition="$status == 2 ">selected</if>>已读</option>
			</select>
			<input type="submit" class="btn btn-primary" value="搜索" />
		</form>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th width="50">ID</th>
						<th width="100">{:L('NAME')}</th>
						<th width="150">联系方式</th>
						<th>{:L('CONTENT')}</th>
						<th width="120">{:L('TIME')}</th>
						<th width="120">查看时间</th>
						<th width="120">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="guestmsgs" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.name}</td>
						<td>{$vo.tel}</td>
						<td>{$vo.comtent}</td>
						<td>{$vo.add_time|date='Y-m-d',###}</td>
						<if condition="$vo.open_time == 0 ">
						<td>暂无查看</td>
							<else />
							<td>{$vo['open_time']|date='Y-m-d',###} </td>
						</if>
						<td>
							<a href="{:U('guestbookadmin/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a>|
							<if condition="$vo.status == 0 ">
								<a href="{:U('guestbookadmin/status',array('id'=>$vo['id']))}" class="js-ajax-infoStatus">查看</a>
								<else />
								<a href="javascript:;">已查看</a>
							</if>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js?"></script>
</body>
</html>